﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace PeisongWeb.admin
{
    public partial class priceUpdate : adminPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!hasPermission("CB", 2))
                {
                    Library.Script.ClientMsgUrl("没有权限！", "index.aspx");
                    return;
                }


                //rptBind();
            }
        }
        //void rptBind()
        //{
        //    StringBuilder where = new StringBuilder();

        //        where.Append("treelevel=1");
        //    DataSet ds = logic.category.subList(where.ToString(), "categoryId", 8000,1);

        //    rpt_list.DataSource = ds.Tables[1];
        //    rpt_list.DataBind();
        //}
        //[AjaxMethod]
        //public void UpdateTimeStamp(string categoryName)
        //{

        //    StringBuilder where = new StringBuilder();
        //    where.Append("parentName='" + categoryName + "'");
        //    DataSet ds = logic.category.subList(where.ToString(), "categoryId", 8000, 1);

        //    this.rpt_list.DataSource = ds.Tables[1];
        //    this.rpt_list.DataBind();
        //}


        private void getDetails()
        {
            //CategoryEntity category = logic.category.getById(id);
            //txt_Name.Text = category.Name;

            //txt_Treelevel.Text = category.Treelevel.ToString();
            //txt_Sort.Text = category.Sort.ToString();
            //txt_Ab.Text = category.Shortname;
            //drp_ParentCategory.SelectedIndex = drp_ParentCategory.Items.IndexOf(drp_ParentCategory.Items.FindByValue(category.ParentId.ToString()));
            //chx_isShow.Checked = category.IsShow;
        }
        private void drpBind()
        {
            //drp_ParentCategory.DataSource = logic.category.select("treelevel<2", "categoryId", 1000, 1).Tables[1];
            //drp_ParentCategory.DataBind();
            //drp_ParentCategory.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--无--", "0"));
        }
    }
}
